package neuralNetworks;

public class StdNetInit implements NetInit {

	@Override
	public double getBias(Functions actFunc, int layerNeurons) {
		return (Math.random() * 2. - 1.) / 2.;
	}

	@Override
	public double getWeight(Functions actFunc, int layerNeurons) {
		return actFunc == Functions.tanh ? (Math.random() * 2. - 1.)
				/ (layerNeurons  * 4.) : (Math.random() * 2. - 1.)
				/ (layerNeurons  * 4.);
	}

}
